﻿//===================================================================
// 西交通开发框架-XCI.Parent 2019 版权所有     
//===================================================================
using System.ComponentModel.DataAnnotations;
using XCI.Core;

namespace XCI.Sys.Model
{
    /// <summary>
    /// 系统文件
    /// </summary>
    [ApiModel(Caption = "系统文件")]
    public class SysFile
    {
        /// <summary>
        /// 文件主键
        /// </summary>
        [Display(Name ="文件主键")]
        [ApiModelProperty(PrimaryKey = true)]
        public string Id { get; set; }

        /// <summary>
        /// 文件分组
        /// </summary>
        [Display(Name = "文件分组")]
        public string Category { get; set; }

        /// <summary>
        /// 文档类型
        /// </summary>
        [Display(Name = "文档类型")]
        [StringLength(100, ErrorMessage = "文档类型不能超过100个字符")]
        public string ContentType { get; set; }

        /// <summary>
        /// 记录主键
        /// </summary>
        [Display(Name ="记录主键")]
        public string PrimaryKey { get; set; }

        /// <summary>
        /// 表名
        /// </summary>
        [Display(Name = "表名")]
        public string TableName { get; set; }

        /// <summary>
        /// 文件名称
        /// </summary>
        [Display(Name ="文件名称")]
        [Required(ErrorMessage = "请输入文件名称")]
        [StringLength(100, ErrorMessage = "文件名称不能超过100个字符")]
        public string FileName { get; set; }

        /// <summary>
        /// 文件路径
        /// </summary>
        [Display(Name ="文件路径")]
        [StringLength(200, ErrorMessage = "文件路径不能超过200个字符")]
        public string FilePath { get; set; }

        /// <summary>
        /// 文件大小
        /// </summary>
        [Display(Name ="文件大小")]
        public long? FileSize { get; set; }

        /// <summary>
        /// 文件md5
        /// </summary>
        [Display(Name = "文件md5")]
        [StringLength(100, ErrorMessage = "文件md5不能超过200个字符")]
        public string FileMd5 { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public SysFile Clone()
        {
            return (SysFile)MemberwiseClone();
        }
    }
}
